package com.diandian.backend.order.controller;

import com.diandian.backend.order.service.OrderOnlineJingdongHomeSourceService;
import com.diandian.base.boot.starter.response.BaseResult;
import com.diandian.backend.order.param.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 线上京东到家订单原始数据
 */
@RestController
@RequestMapping("/order/online/jingdong/home/source")
public class OrderOnlineJingdongHomeSourceController {

    @Autowired
    private OrderOnlineJingdongHomeSourceService orderOnlineJingdongHomeSourceService;

    @PostMapping("/add")
    public BaseResult add(@RequestBody OrderOnlineJingdongHomeSourceAddParam param) {
        orderOnlineJingdongHomeSourceService.add(param.toDTO());
        return new BaseResult(0, "success", null);
    }

}